
Public NotInheritable Class ColumnAttribute
	Inherits Attribute
	Private mColumnName As String
	Private mWidth As Integer
	Private mDecimals As Integer

	Private mOverflowBehaviour As OverflowBehaviour
	Private mColumnType As ColumnType

	Public Sub New()
		mWidth = -1
		mDecimals = -1
		mColumnType = ColumnType.UNKNOWN
	End Sub

	Public Property ColumnName() As String
		Get
			Return mColumnName
		End Get
		Set
			mColumnName = value
		End Set
	End Property

	''' <summary>
	''' Full width of the column (including dot and decimals).
	''' </summary>
	<System.ComponentModel.Description("Full width of the column (including dot and decimals)")> _
	Public Property Width() As Integer
		Get
			Return mWidth
		End Get
		Set
			mWidth = value
		End Set
	End Property

	Public Property Decimals() As Integer
		Get
			Return mDecimals
		End Get
		Set
			mDecimals = value
		End Set
	End Property

	Public Property OverflowBehaviour() As OverflowBehaviour
		Get
			Return mOverflowBehaviour
		End Get
		Set
			mOverflowBehaviour = value
		End Set
	End Property

	Public Property Type() As ColumnType
		Get
			Return mColumnType
		End Get
		Set
			mColumnType = value
		End Set
	End Property

	Private mAdvancedType As AdvancedColumnType

	Public Property AdvancedType() As AdvancedColumnType
		Get
			Return mAdvancedType
		End Get
		Set
			mAdvancedType = value
		End Set
	End Property
End Class

Public NotInheritable Class RecordAttribute
	Inherits Attribute
	Private mVersion As DbfVersion
	Private mColumnMapping As FieldMapping
	Private mOverflowBehaviour As OverflowBehaviour
	Private mWidth As Integer

	Public Sub New()
		mColumnMapping = FieldMapping.PrivateFields Or FieldMapping.PublicFields
		mOverflowBehaviour = OverflowBehaviour.ThrowError
	End Sub

	Public Property Version() As DbfVersion
		Get
			Return mVersion
		End Get
		Set
			mVersion = value
		End Set
	End Property

	Public Property FieldMapping() As FieldMapping
		Get
			Return mColumnMapping
		End Get
		Set
			mColumnMapping = value
		End Set
	End Property

	Public Property OverflowBehaviour() As OverflowBehaviour
		Get
			Return mOverflowBehaviour
		End Get
		Set
			mOverflowBehaviour = value
		End Set
	End Property

	Public Property Width() As Integer
		Get
			Return mWidth
		End Get
		Set
			mWidth = Width
		End Set
	End Property


End Class
